package client

import (
	"StudentClient/protos"
	"google.golang.org/grpc"
)

const address = "localhost:8099"

func ConnectServer() (protos.StudentServiceClient, *grpc.ClientConn, error) {
	conn, err := grpc.Dial(address, grpc.WithInsecure())
	if err != nil {
		return nil, nil, err
	}

	stuClient := protos.NewStudentServiceClient(conn)
	return stuClient, conn, nil
}
